From 4df9ae27a2d49074a19f963ec54c99ff33bc4411 Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Thu, 11 May 2006 13:42:20 +0100 Subject: [PATCH] Fix the building of the Xen TPM driver as module and prevents front- and backends to be rmmod'ed by removing their module_exit line. Signed-off-by: Stefan Berger --- linux-2.6-xen-sparse/drivers/char/tpm/Kconfig | 9 ++++----- linux-2.6-xen-sparse/drivers/char/tpm/Makefile | 3 ++- linux-2.6-xen-sparse/drivers/char/tpm/tpm_xen.c | 1 - linux-2.6-xen-sparse/drivers/xen/tpmback/tpmback.c | 2 -- 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/linux-2.6-xen-sparse/drivers/char/tpm/Kconfig b/linux-2.6-xen-sparse/drivers/char/tpm/Kconfig index 4331c7c6d0..3852fae92a 100644 --- a/linux-2.6-xen-sparse/drivers/char/tpm/Kconfig +++ b/linux-2.6-xen-sparse/drivers/char/tpm/Kconfig @@ -53,10 +53,9 @@ config TCG_XEN tristate "XEN TPM Interface" depends on TCG_TPM && XEN ---help--- - If you want to make TPM support available to a Xen - user domain, say Yes and it will - be accessible from within Linux. To compile this driver - as a module, choose M here; the module will be called - tpm_xen. + If you want to make TPM support available to a Xen user domain, + say Yes and it will be accessible from within Linux. + To compile this driver as a module, choose M here; the module + will be called tpm_xenu. endmenu diff --git a/linux-2.6-xen-sparse/drivers/char/tpm/Makefile b/linux-2.6-xen-sparse/drivers/char/tpm/Makefile index b1a3d91c88..7666e39d2b 100644 --- a/linux-2.6-xen-sparse/drivers/char/tpm/Makefile +++ b/linux-2.6-xen-sparse/drivers/char/tpm/Makefile @@ -8,4 +8,5 @@ endif obj-$(CONFIG_TCG_NSC) += tpm_nsc.o obj-$(CONFIG_TCG_ATMEL) += tpm_atmel.o obj-$(CONFIG_TCG_INFINEON) += tpm_infineon.o -obj-$(CONFIG_TCG_XEN) += tpm_xen.o tpm_vtpm.o +obj-$(CONFIG_TCG_XEN) += tpm_xenu.o +tpm_xenu-y = tpm_xen.o tpm_vtpm.o diff --git a/linux-2.6-xen-sparse/drivers/char/tpm/tpm_xen.c b/linux-2.6-xen-sparse/drivers/char/tpm/tpm_xen.c index 4d38953444..bf58e109dd 100644 --- a/linux-2.6-xen-sparse/drivers/char/tpm/tpm_xen.c +++ b/linux-2.6-xen-sparse/drivers/char/tpm/tpm_xen.c @@ -752,7 +752,6 @@ static void __exit tpmif_exit(void) } module_init(tpmif_init); -module_exit(tpmif_exit); MODULE_LICENSE("Dual BSD/GPL"); diff --git a/linux-2.6-xen-sparse/drivers/xen/tpmback/tpmback.c b/linux-2.6-xen-sparse/drivers/xen/tpmback/tpmback.c index cb2442aef0..302d9e9f9f 100644 --- a/linux-2.6-xen-sparse/drivers/xen/tpmback/tpmback.c +++ b/linux-2.6-xen-sparse/drivers/xen/tpmback/tpmback.c @@ -1071,8 +1071,6 @@ static void __exit tpmback_exit(void) misc_deregister(&vtpms_miscdevice); } -module_exit(tpmback_exit); - MODULE_LICENSE("Dual BSD/GPL"); /* -- 2.30.2